<template>
  <!-- 表单设计器 S -->
  <form-design ref="formDesign" v-model="fields" mode="projectType"></form-design>
  <!-- 表单设计器 E -->
</template>
<script>
import { onMounted, reactive, toRefs } from 'vue';

export default {
  name: 'project-fields-design',
  props: {
    templateId: {
      type: String | Number,
      default: '',
    },
    fields: {
      type: Array,
      default: () => []
    },
    initFields: {
      type: Array,
      default: () => []
    }
  },
  setup(props) {
    // 检查内容是否有修改 (暴露的方法)
    const checkModified = () => {
      return JSON.stringify(props.fields) != JSON.stringify(props.initFields);
    };

    return {
      checkModified
    };
  },
};
</script>